package com.chinaway.dsp.util;

import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.events.VerifyListener;

/**
 * 验证经纬度有效性
 * @author Mr.Huang
 *
 */
public class LngLatVerifyListener implements VerifyListener{

	@Override
	public void verifyText(VerifyEvent e) {
		String string=e.text;
		char[] c=string.toCharArray();
		if(c.length>0){
			for(int i=0;i<c.length;i++){
				if(".0123456789".indexOf(c[i]) ==-1){
					e.doit=false;
					return;
				}
			}
			e.doit=true;
			}
		e.doit=true;
	}

}
